﻿using IM.Easy.Core.Services;
using IM.Easy.Entity.System;
using IM.Easy.Infrastructure.Query;
using IM.Easy.SystemServices.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.SystemServices.IServices
{
    public interface IDictDataService : IAppServices<SysDictData>
    {
        /// <summary>
        /// 获取字典数据详细数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DictDataDto GetData(long id);

        /// <summary>
        /// 根据字典类型获取数据
        /// </summary>
        /// <param name="types"></param>
        /// <returns></returns>
        List<DictDataDto> GetByTypes(params string[] types);

        /// <summary>
        /// 添加字典数据
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        long Add(DictDataDto dto);

        /// <summary>
        /// 更新字典数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Update(DictDataDto dto);

        /// <summary>
        /// 获取所有字典数据
        /// </summary>
        /// <returns>所有字典数据列表</returns>
        PageResponse<DictDataDto> GetList(DictDataQueryDto query);
    }
}
